﻿using IM.Easy.Core.ServiceLifetime;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.Core.Services
{
    public interface IAppServices : ITransient
    {
    }
    public interface IAppServices<T> : IAppServices, ISugarRepository, ISimpleClient<T> where T : class, new()
    {
        bool Update(Expression<Func<T, bool>> columns, Expression<Func<T, bool>> whereExpression);

        /// <summary>
        /// 保存或更新实体
        /// </summary>
        /// <param name="data"></param>
        /// <returns>返回保存或更新后的实体</returns>
        T InsertOrUpdateReturnEntity(T data);
    }

}
